FROM m2qfhxjz6g435v.xuanyuan.dev/python:3.12-slim

# 设置工作目录
WORKDIR /app

# 拷贝依赖文件并安装
COPY requirements.txt ./
RUN pip install -r requirements.txt
# 换国内源装 ffmpeg：推荐使用中科大或清华源
RUN sed -i 's@deb.debian.org@mirrors.ustc.edu.cn@g' /etc/apt/sources.list \
    && apt-get update \
    && apt-get install -y ffmpeg \
    && rm -rf /var/lib/apt/lists/*
# 拷贝项目代码
COPY . .

# 启动服务
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8100"]